﻿using DataAccess;
using DTO;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DAO
{
   public class DangNhapDAO
    {
        public static bool  ktDangNhap(DangNhapDTO dn)
        {
            string query = "SELECT MaNhanVien,MatKhau FROM  TAIKHOAN ";
            query += "WHERE (MaNhanVien = N'" + dn.MaNhanVien + "') AND (MatKhau = '" + dn.MatKhau + "')";
            if (DataConnection.ExecQuery(query).Rows.Count>0)
            {
                return true;
            }
            return false;
        }
    }
}
